//
//  ViewController.m
//  UserInfoManager
//
//  Created by imac on 2017/6/20.
//  Copyright © 2017年 LiuShun. All rights reserved.
//

#import "ViewController.h"

#import "UserManager.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.

    NSDictionary *dataDic = @{@"name":@"王二",
                              @"icon":@"www",
                              @"age":@"18",
                              @"height":@"168",
                              @"money":@"100000000",
                              @"id":@"9528"
                              };
    
    [[UserManager defaultManager] saveUserData:dataDic];
}
- (IBAction)click:(id)sender {
    NSLog(@" userData : %@ ", [[UserManager defaultManager] uid]);
}
- (IBAction)delate:(id)sender {
    [[UserManager defaultManager] delateAllUserData];
}
- (IBAction)loginClcik:(id)sender {
    if ([[UserManager defaultManager] isLogin]) {
        NSLog(@"登录成功");
    }else{
//        [[UserManager sharedManager] goToLoginViewController:self];
        NSLog(@"暂未登录");
    }
}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
